unit uAppCmdLineParams;

interface

uses
  uDZSysUtils, uDZProcess;

type
  TAppCmdLineParams = class(TDzCmdLineParams)
  private
    fDebugMode: Boolean;
    fLogType: TDzAppLogType;
    fCheckUpdate: Boolean;
    fPort: Integer;
    fHost: AnsiString;
    fYDTParam: string;
    fUseSkin: TNullableBool;
  protected
    procedure ParseParam(const param: string); override;
  published
    property CheckUpdate: Boolean read fCheckUpdate write fCheckUpdate;
    property DebugMode: Boolean read fDebugMode write fDebugMode;
    property LogType: TDzAppLogType read fLogType write fLogType;
    property Host: AnsiString read fHost write fHost;
    property Port: Integer read fPort write fPort;
    property UseSkin: TNullableBool read fUseSkin write fUseSkin;
    property ycdp: string read fYDTParam write fYDTParam;
  end;

var
  CmdLineParams: TAppCmdLineParams;
  
implementation

{ TAppCmdLineParams }

procedure TAppCmdLineParams.ParseParam(const param: string);
begin
  inherited;
  if Pos('-ycdp:', param) = 1 then fYDTParam := Copy(param, 7, MaxInt);
end;

initialization
  CmdLineParams := TAppCmdLineParams.Create;
  CmdLineParams.CheckUpdate := True;
  CmdLineParams.DebugMode := False;
  ParseCmdLine(CmdLineParams);

finalization
  CmdLineParams.Free;

end.
